function results=ConstructElementK(perEln,alphax,alphay,beta,f,coordinates)
    matrix=[[1,coordinates{1}(1),coordinates{1}(2)];
            [1,coordinates{2}(1),coordinates{2}(2)];
            [1,coordinates{3}(1),coordinates{3}(2)]];
    delta=1/2*det(matrix);
    
    a=[coordinates{2}(1)*coordinates{3}(2)-coordinates{3}(1)*coordinates{2}(2),...
       coordinates{3}(1)*coordinates{1}(2)-coordinates{1}(1)*coordinates{3}(2),...
       coordinates{1}(1)*coordinates{2}(2)-coordinates{2}(1)*coordinates{1}(2)];
    
    b=[coordinates{2}(2)-coordinates{3}(2),...
       coordinates{3}(2)-coordinates{1}(2),...
       coordinates{1}(2)-coordinates{2}(2)];
    
    c=[coordinates{3}(1)-coordinates{2}(1),...
       coordinates{1}(1)-coordinates{3}(1),...
       coordinates{2}(1)-coordinates{1}(1)];
    
    K=zeros(perEln,perEln);
    for m=1:perEln
        for n=1:perEln
            if m==n
               K(m,n)=1/(4*delta)*(alphax*b(m)*b(n)+alphay*c(m)*c(n))+delta/12*beta*(1+1);
            else
               K(m,n)=1/(4*delta)*(alphax*b(m)*b(n)+alphay*c(m)*c(n))+delta/12*beta*(1);  
            end
        end
    end
%     l=length(nodes);
    
%     for i=1:nel
%         coordinate=nodeXY;
%         delta=1
%         K(coordinate(1),coordinate(2))=;
%     end
    results=K;
end
